package com.rest.demo.functional.io;

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;

/**
 * @author Administrator
 * @decription
 * @Date 2018-02-05 11:03
 */
public class CopyFileDemo {
    public static void main(String[] args) throws IOException {
        File file = new File("F:\\a-copy.txt");
        file.createNewFile();

        Files.write(Paths.get("F:\\a-copy.txt"),Files.readAllBytes(Paths.get("F:\\a.txt")), StandardOpenOption.APPEND);
    }
}
